// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*!
 * @file TestArray.h
 * This header file contains the declaration of the described types in the IDL file.
 *
 * This file was generated by the tool gen.
 */

#ifndef _TESTARRAY_H_
#define _TESTARRAY_H_


#include <stdint.h>
#include <array>
#include <string>
#include <vector>
#include <map>
#include <bitset>

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#define eProsima_user_DllExport __declspec( dllexport )
#else
#define eProsima_user_DllExport
#endif  // EPROSIMA_USER_DLL_EXPORT
#else
#define eProsima_user_DllExport
#endif  // _WIN32

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#if defined(TestArray_SOURCE)
#define TestArray_DllAPI __declspec( dllexport )
#else
#define TestArray_DllAPI __declspec( dllimport )
#endif // TestArray_SOURCE
#else
#define TestArray_DllAPI
#endif  // EPROSIMA_USER_DLL_EXPORT
#else
#define TestArray_DllAPI
#endif // _WIN32

namespace eprosima {
namespace fastcdr {
class Cdr;
} // namespace fastcdr
} // namespace eprosima


/*!
 * @brief This class represents the structure TestArray defined by the user in the IDL file.
 * @ingroup TESTARRAY
 */
class TestArray
{
public:

    /*!
     * @brief Default constructor.
     */
    eProsima_user_DllExport TestArray();

    /*!
     * @brief Default destructor.
     */
    eProsima_user_DllExport ~TestArray();

    /*!
     * @brief Copy constructor.
     * @param x Reference to the object TestArray that will be copied.
     */
    eProsima_user_DllExport TestArray(
            const TestArray& x);

    /*!
     * @brief Move constructor.
     * @param x Reference to the object TestArray that will be copied.
     */
    eProsima_user_DllExport TestArray(
            TestArray&& x);

    /*!
     * @brief Copy assignment.
     * @param x Reference to the object TestArray that will be copied.
     */
    eProsima_user_DllExport TestArray& operator =(
            const TestArray& x);

    /*!
     * @brief Move assignment.
     * @param x Reference to the object TestArray that will be copied.
     */
    eProsima_user_DllExport TestArray& operator =(
            TestArray&& x);

    /*!
     * @brief This function copies the value in member str
     * @param _str New value to be copied in member str
     */
    eProsima_user_DllExport void str(
            const std::array<char, 512>& _str);

    /*!
     * @brief This function moves the value in member str
     * @param _str New value to be moved in member str
     */
    eProsima_user_DllExport void str(
            std::array<char, 512>&& _str);

    /*!
     * @brief This function returns a constant reference to member str
     * @return Constant reference to member str
     */
    eProsima_user_DllExport const std::array<char, 512>& str() const;

    /*!
     * @brief This function returns a reference to member str
     * @return Reference to member str
     */
    eProsima_user_DllExport std::array<char, 512>& str();
    /*!
     * @brief This function copies the value in member intArr
     * @param _intArr New value to be copied in member intArr
     */
    eProsima_user_DllExport void intArr(
            const std::array<int32_t, 8>& _intArr);

    /*!
     * @brief This function moves the value in member intArr
     * @param _intArr New value to be moved in member intArr
     */
    eProsima_user_DllExport void intArr(
            std::array<int32_t, 8>&& _intArr);

    /*!
     * @brief This function returns a constant reference to member intArr
     * @return Constant reference to member intArr
     */
    eProsima_user_DllExport const std::array<int32_t, 8>& intArr() const;

    /*!
     * @brief This function returns a reference to member intArr
     * @return Reference to member intArr
     */
    eProsima_user_DllExport std::array<int32_t, 8>& intArr();
    /*!
     * @brief This function copies the value in member charArr
     * @param _charArr New value to be copied in member charArr
     */
    eProsima_user_DllExport void charArr(
            const std::array<char, 64>& _charArr);

    /*!
     * @brief This function moves the value in member charArr
     * @param _charArr New value to be moved in member charArr
     */
    eProsima_user_DllExport void charArr(
            std::array<char, 64>&& _charArr);

    /*!
     * @brief This function returns a constant reference to member charArr
     * @return Constant reference to member charArr
     */
    eProsima_user_DllExport const std::array<char, 64>& charArr() const;

    /*!
     * @brief This function returns a reference to member charArr
     * @return Reference to member charArr
     */
    eProsima_user_DllExport std::array<char, 64>& charArr();

    /*!
     * @brief This function returns the maximum serialized size of an object
     * depending on the buffer alignment.
     * @param current_alignment Buffer alignment.
     * @return Maximum serialized size.
     */
    eProsima_user_DllExport static size_t getMaxCdrSerializedSize(
            size_t current_alignment = 0);

    /*!
     * @brief This function returns the serialized size of a data depending on the buffer alignment.
     * @param data Data which is calculated its serialized size.
     * @param current_alignment Buffer alignment.
     * @return Serialized size.
     */
    eProsima_user_DllExport static size_t getCdrSerializedSize(
            const TestArray& data,
            size_t current_alignment = 0);


    /*!
     * @brief This function serializes an object using CDR serialization.
     * @param cdr CDR serialization object.
     */
    eProsima_user_DllExport void serialize(
            eprosima::fastcdr::Cdr& cdr) const;

    /*!
     * @brief This function deserializes an object using CDR serialization.
     * @param cdr CDR serialization object.
     */
    eProsima_user_DllExport void deserialize(
            eprosima::fastcdr::Cdr& cdr);



    /*!
     * @brief This function returns the maximum serialized size of the Key of an object
     * depending on the buffer alignment.
     * @param current_alignment Buffer alignment.
     * @return Maximum serialized size.
     */
    eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(
            size_t current_alignment = 0);

    /*!
     * @brief This function tells you if the Key has been defined for this type
     */
    eProsima_user_DllExport static bool isKeyDefined();

    /*!
     * @brief This function serializes the key members of an object using CDR serialization.
     * @param cdr CDR serialization object.
     */
    eProsima_user_DllExport void serializeKey(
            eprosima::fastcdr::Cdr& cdr) const;

private:

    std::array<char, 512> m_str;
    std::array<int32_t, 8> m_intArr;
    std::array<char, 64> m_charArr;
};

#endif // _TESTARRAY_H_